<template>
	<div>
		testpartial<br />
		count:{{count}}<br />
		<el-button @click="addCount">测试</el-button>
		<slot>
			<div style="color:red;">新增按钮 启用/禁用按钮</div>
			<slot name="add">
				<div style="color:red;">未添加自定义按钮</div>
			</slot>
		</slot>
	</div>
</template>
<script>
	import common from "@/common/common.js";

	export default {
		name: "testpartial",
		mixins: [common.baseVM],
		data() {
			return {
				count: 0
			};
		},
		created() {
			console.log(this.$attrs, this.$listeners);
			for (var item in this.$listeners) {
				console.log(item, this.$listeners[item].toString());
			}
		},
		methods: {
			addCount() {
				this.count++;
				this.$parent.changePartalCount();
			}
		},
	};
</script>
